package com.aierkeji.b2c.entity;

import java.sql.Timestamp;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

@Entity
@Table(name="akj_alipay_life_product_ref")
@IdClass(AkjAlipayLifeProductPK.class)
public class AkjAlipayLifeProductre {
	@Id 
	@ManyToOne(targetEntity = AkjAlipayLife.class, cascade = CascadeType.REFRESH, fetch = FetchType.EAGER)
	@JoinColumn(name = "life_id")
//	@NotFound(action = NotFoundAction.IGNORE)
	private AkjAlipayLife ajAkjAlipayLife;

	@Id 
	@ManyToOne(targetEntity = AkjProduct.class, cascade = CascadeType.REFRESH, fetch = FetchType.EAGER)
	@JoinColumn(name = "product_id")
//	@NotFound(action = NotFoundAction.IGNORE)
	private AkjProduct ajAkjProduct;
	
	
	@ManyToOne(targetEntity = AkjAuser.class, cascade = CascadeType.REFRESH, fetch = FetchType.EAGER)
    @JoinColumn(name = "create_by")
    @NotFound(action = NotFoundAction.IGNORE)
    private AkjAuser createBy;
    
    @Column(columnDefinition = "datetime")
    private Timestamp createAt;

	public AkjAlipayLife getAjAkjAlipayLife() {
		return ajAkjAlipayLife;
	}

	public void setAjAkjAlipayLife(AkjAlipayLife ajAkjAlipayLife) {
		this.ajAkjAlipayLife = ajAkjAlipayLife;
	}

	public AkjProduct getAjAkjProduct() {
		return ajAkjProduct;
	}

	public void setAjAkjProduct(AkjProduct ajAkjProduct) {
		this.ajAkjProduct = ajAkjProduct;
	}

	public AkjAuser getCreateBy() {
		return createBy;
	}

	public void setCreateBy(AkjAuser createBy) {
		this.createBy = createBy;
	}

	public Timestamp getCreateAt() {
		return createAt;
	}

	public void setCreateAt(Timestamp createAt) {
		this.createAt = createAt;
	}
    
    
    
    
}
